﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
	<link href="js-console.css" rel="stylesheet" />
	<!-- 1. Write a script that prints all the numbers from 1 to N -->
</head>
<body>
	<div id="js-console"></div>
	<script src="js-console.js"></script>
	<script>
		//Read input
		var number = prompt("Enter positive integer");

		if (!isNaN(number) && number > 0) {
			number *= 1;	// make them real number

			for (var i = 1; i <= number; i++) {
				jsConsole.writeLine(i);
			}
		}
		else {
			jsConsole.writeLine("Wrong input.");
		}
	</script>
</body>
</html>
